package com.timeshare.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

/**
 * 用户实体
 */
@Data
@TableName("users")
public class User {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String username;
    
    private String password;
    
    private String nickname;
    
    private String avatar;
    
    private String email;
    
    private String phone;
    
    private String school;
    
    private String major;
    
    private String grade;
    
    /**
     * 用户积分
     */
    private Integer points;
    
    /**
     * 信誉分（0-100）
     */
    private Integer creditScore;
    
    /**
     * 个人简介
     */
    private String bio;
    
    /**
     * 技能标签（JSON格式）
     */
    private String skillTags;
    
    /**
     * 账号状态：0-正常 1-封禁
     */
    private Integer status;
    
    /**
     * 用户角色：0-普通用户 1-管理员
     */
    private Integer role;
    
    /**
     * 逻辑删除：0-未删除 1-已删除
     */
    @TableLogic
    private Integer deleted;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}

